package cn.doitedu.profile.ml.comment

import java.util

import com.hankcs.hanlp.HanLP
import com.hankcs.hanlp.seg.common.Term

object HanLpDemo {
  def main(args: Array[String]): Unit = {

    val str = HanLP.convertToPinyinFirstCharString("我爱你",",",false)
    println(str)

    val str2 = HanLP.convertToPinyinString("我爱你",",",false)
    println(str2)


    val terms: util.List[Term] = HanLP.segment("我有一头小毛驴我从来也不骑，有一天我心血来潮骑着去赶集，手拿皮鞭心里正得意，不知怎么哗啦啦摔了一身泥，抬头一看，到了多易")

    import scala.collection.JavaConversions._
    terms.foreach(term=>println(term.word))


  }

}
